<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="renderer" content="webkit">
  		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>网站后台管理模版--学员添加</title>
		<link rel="stylesheet" type="text/css" href="../../static/admin/layui/css/layui.css"/>
		<link rel="stylesheet" type="text/css" href="../../static/admin/css/admin.css"/>
	</head>
	<body>
	<form class="layui-form column-content-detail">
					<div class="layui-tab">
						<ul class="layui-tab-title">
							<li class="layui-this">学员信息</li>
							<li>备注</li>
						</ul>
						<div class="layui-tab-content">
							<!-- 名字 -->
							<div class="layui-tab-item layui-show">
								<div class="layui-form-item">
									<label class="layui-form-label">学员名字：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="请输入学员姓名" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 性别 -->
								<div class="layui-form-item">
									<label class="layui-form-label">学员性别：</label>
									<div class="layui-input-block">
										<select name="category" lay-verify="required">
											<option value="">请选择学员性别</option>
												<option value="1">男</option>
												<option value="2">女</option>
										</select>
									</div>
								</div>
								<!-- 身份证号码与出生日期 -->
								<div class="layui-form-item">
									<label class="layui-form-label">身份证号：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="请输入身份证号" autocomplete="off" class="layui-input">
									</div>
								</div>
								<div class="layui-form-item">
									<label class="layui-form-label">出生日期：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="自动生成出生日期" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 文化水平 -->
								<div class="layui-form-item">
									<label class="layui-form-label">文化程度：</label>
									<div class="layui-input-block">
										<select name="category" lay-verify="required">
											<option value="">请选学员文化程度</option>
												<option value="1">本科</option>
												<option value="2">大专</option>
										</select>
									</div>
								</div>
								<!-- 联系电话 -->
								<div class="layui-form-item">
									<label class="layui-form-label">联系电话：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="请输入学员的联系电话" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 培训类别 -->
								<div class="layui-form-item">
									<label class="layui-form-label">培训类别：</label>
									<div class="layui-input-block">
										<select name="category" lay-verify="required">
											<option value="">请选学员培训类别</option>
												<option value="1">初训</option>
												<option value="2">复训</option>
												<option value="2">换证</option>
										</select>
									</div>
								</div>
								<!-- 操作项目 -->
								<div class="layui-form-item">
									<label class="layui-form-label">操作项目：</label>
									<div class="layui-input-block">
										<select name="category" lay-verify="required">
											<option value="">请选学员操作项目</option>
												<option value="1">科目1</option>
												<option value="2">科目b</option>
												<option value="2">科目6</option>
										</select>
									</div>
								</div>
								<!-- 工作单位 -->
								<div class="layui-form-item">
									<label class="layui-form-label">工作单位：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="请输入学员的工作单位" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 联系电话 -->
								<div class="layui-form-item">
									<label class="layui-form-label">家庭住址：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="请输入学员的家庭住址" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 报名机构 -->
								<div class="layui-form-item">
									<label class="layui-form-label">报名机构：</label>
									<div class="layui-input-block">
										<input type="text" name="name" required lay-verify="required" placeholder="报名机构自动生成" autocomplete="off" class="layui-input">
									</div>
								</div>
								<!-- 图片功能暂未解锁 -->
								<!-- <div class="layui-form-item">
									<label class="layui-form-label">图像上传：</label>
									<div class="layui-input-block">
										<input type="file" name="file（可随便定义）" class="layui-upload-file">
									</div>
								</div> -->
								<!-- 标签功能暂未解锁 -->
								<!-- <div class="layui-form-item">
									<label class="layui-form-label">标签：</label>
									<div class="layui-input-block">
										<input type="checkbox" name="label[tj]" title="推荐" checked>
										<input type="checkbox" name="label[zd]" title="置顶">
										<input type="checkbox" name="label[hot]" title="热门">
									</div>
								</div> -->
								<!-- 是否单页搞不清楚 -->
								<!-- <div class="layui-form-item">
									<label class="layui-form-label">是否单页：</label>
									<div class="layui-input-block">
										<input type="checkbox" name="switch" lay-skin="switch">
									</div>
								</div> -->
							</div>
							<div class="layui-tab-item">
								<div class="layui-form-item layui-form-text">
									<label class="layui-form-label">备注：</label>
									<div class="layui-input-block">
										<textarea placeholder="请输入内容" class="layui-textarea"></textarea>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="layui-form-item" style="padding-left: 10px;">
						<div class="layui-input-block">
							<button class="layui-btn layui-btn-normal" lay-submit lay-filter="formDemo">立即提交</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
	<script src="../../static/admin/layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../static/admin/js/common.js" type="text/javascript" charset="utf-8"></script>
	<script>
		layui.use(['form', 'jquery', 'laydate', 'layer', 'laypage', 'dialog', 'common', 'tool', 'element', 'upload', 'layedit'], function() {
				var form = layui.form(),
					layer = layui.layer,
					$ = layui.jquery,
					laypage = layui.laypage,
					laydate = layui.laydate,
					layedit = layui.layedit,
					common = layui.common,
					tool = layui.tool,
					element = layui.element(),
					dialog = layui.dialog;

				//获取当前iframe的name值
				var iframeObj = $(window.frameElement).attr('name');
				//创建一个编辑器
				var editIndex = layedit.build('LAY_demo_editor', {
					tool: ['strong' //加粗
						, 'italic' //斜体
						, 'underline' //下划线
						, 'del' //删除线
						, '|' //分割线
						, 'left' //左对齐
						, 'center' //居中对齐
						, 'right' //右对齐
						, 'link' //超链接
						, 'unlink' //清除链接
						, 'image' //插入图片
					],
					height: 100
				})
				//全选
				form.on('checkbox(allChoose)', function(data) {
					var child = $(data.elem).parents('table').find('tbody input[type="checkbox"]');
					child.each(function(index, item) {
						item.checked = data.elem.checked;
					});
					form.render('checkbox');
				});
				form.render();

				layui.upload({
					url: '上传接口url',
					success: function(res) {
						console.log(res); //上传成功返回值，必须为json格式
					}
				});
			});
	</script>
	</body>
</html>